package com.h3c.ptability.client;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "ABC", url = "${wxapi.url}")
public interface WxFeignClient {

    @GetMapping(value = "common/gettoken", consumes = {"application/json"}, headers = {"Authorization={Authorization}"})
    JSONObject getToken(@RequestParam("appid") String appid, @RequestParam("appsecret") String appsecret);

    @GetMapping(value = "common/getuserinfo", consumes = {"application/json"}, headers = {"Authorization={Authorization}"})
    JSONObject getUserInfo(@RequestParam("appid") String appid, @RequestParam("token") String token,
                           @RequestParam("wxappkey") String wxappkey, @RequestParam("wxcode") String wxcode,
                           @RequestParam("clienttype") String clienttype, @RequestParam("needdetail") boolean needdetail, @RequestParam("source") String source);

}
